MSVC fixes/workarounds from Gerhard Olsson.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 12 Jul 2013 17:23:55 +0000 (17:23 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 12 Jul 2013 17:23:55 +0000 (17:23 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4421 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/gbtypes.h
gpsbabel/lowranceusr.cc
gpsbabel/lowranceusr4.cc
gpsbabel/xmlgeneric.h

index d247648af8420552ded2788dbb90bb849591dc6a..fb8a89c367b05b86c0fdb395b05286c4e2d58a66 100644 (file)
@@ -33,8 +33,9 @@
 
 typedef unsigned long gbuint32;
 typedef unsigned short gbuint16;
-typedef long gbint32;
+typedef int gbint32;
 typedef short gbint16;
+#include <stdint.h>
 
 #else
 
index 0c1685b5d65608fec97ff30ab03fa42b9fd9f083..3171a255b6e09f8a4035c97c44773e45cb9fa280 100644 (file)
 #include <string.h>
 #include <math.h> /* for lat/lon conversion */
 
+#if defined(_MSC_VER)
+//Incomplete implementation, use existing GB function
+#define lround si_round 
+#endif
+
 typedef struct lowranceusr_icon_mapping {
   const int    value;
   const char*  icon;
index db8ccfaa37e27f0b39f283c7a0530e609bb5a7a4..6f26cca106701bb4d916535e09ffb71f1df78b8d 100644 (file)
 #include <math.h> /* for lat/lon conversion */
 #include <time.h> /* for gmtime */
 
+#if defined(_MSC_VER)
+//Incomplete implementation, use existing GB function
+#define round si_round
+#endif
+
 /* from waypt.c, we need to iterate over waypoints when extracting
    routes */
 extern queue waypt_head;
index 6a36414f476c25032ee06a779fac03b4ba7089e1..0db91c61b19968d6085fcb29efa1226feb4f6527 100644 (file)
@@ -35,7 +35,7 @@ typedef struct xg_tag_mapping {
   const char* tag_name;
 } xg_tag_mapping;
 
-extern char* xhtml_entities;
+extern const char* xhtml_entities;
 
 void write_xml_entity(gbfile* ofd, const QString& indent,
                       const QString& tag, const QString& value);